<html>
<head>
<link href="{{ STATIC_URL }}css/style.css" rel="stylesheet" type="text/css" />
<script src="{{ STATIC_URL }}js/jquery-1.11.1.js"></script>
<script src="{{ STATIC_URL }}js/funcionesJQuery.js"></script>

</head>

<body>
	<header id="full-header">
	<div class="cabecera">

		<div class="logo">
			<a href="/home/"><img src="{{ STATIC_URL }}images/logo-srpeliculas2.png">
			</a>
		</div>
		<div class="login">
			{% if user.is_authenticated %}
			<div class="logged">
					<p>
						Bienvenido, <a href="/perfil/?u={{user.id}}">{{user.username}}</a>. <a href="/logout/">Salir</a>
					</p>
				{% if user.is_superuser %}
					<p>
						<a href="/admin-main/">Ir a panel de control</a>
					</p>
				{% endif %}
			</div>
			{% else %}
			<div class="notlogged">
				<form action="/login/" method="post">
					{% csrf_token %}
					<table class="table-login">
							<tr>
								<th>Usuario</th>
								<td><input type="text" name="user"></td>
							</tr>
							<tr>
								<th>Password</th>
								<td><input type="password" name="passwd"></td>
							</tr>
							<input type="hidden" name="url" value="{{request.get_full_path}}"></td>
							<tr>
								<th colspan=2><input type="submit" value="Enviar"></th>
							</tr>
							<tr>
								<td colspan=2><div class="registrarse"><a href="/registro-user/">Registrarse</a></div>
								</td>
							</tr>
					</table>
				</form>
			</div>
			{% endif %}
		</div>
	</div>
	</header>